home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / GRAPHICS / RAYTRACING / POVRAY3 / POV301 / povray3 / ini / ppmmpeg < prev    next >
Text File  |  1996-07-11  |  3KB  |  85 lines

  1. ;; ppmmpeg.ini - Create an MPEG file.
  2. ;;
  3. ;; URL: http://student.uq.edu.au/~s002434/mpeg.html
  4. ;;
  5. ;; Author:
  6. ;;   Version 1.1
  7. ;;     Fixed for >9 frame animations
  8. ;;     Warwick Allison (warwick@cs.uq.edu.au)
  9. ;;     23 March 1996
  10. ;;   Version 1.0
  11. ;;     Initial version - as posted to comp.graphics.raytracing.rendering
  12. ;;     Warwick Allison (warwick@cs.uq.edu.au)
  13. ;;     21 March 1996
  14. ;;
  15. ;; Sample usage (myfile.ini):
  16. ;;   ;; My animation
  17. ;;   ppmmpeg.ini
  18. ;;   Width=160
  19. ;;   Height=160
  20. ;;   Input_File_Name=myfile.pov  ;; myfile.pov assumes "clock" from 0.0 to 1.0
  21. ;;   Final_frame=20
  22. ;;   Cyclic_Animation=true
  23. ;;
  24. ;; Environment:
  25. ;;   POV_MPEGOPTS   - Additional arguments to pass to mpeg encoder
  26. ;;                         eg. To ask encoder to produce a 1000 bps file:
  27. ;;                               POV_MPEGOPTS="-r 1000" povray myfile.ini
  28. ;;                         eg. To ask encoder to produce a 8192 bit (1K) file:
  29. ;;                               POV_MPEGOPTS="-x 8192" povray myfile.ini
  30. ;;                    Read the manual for mpeg for more information.
  31. ;;
  32. ;; Disk usage:
  33. ;;   Each frame traced generates a .Y, .U, and .V file in a subdirectory
  34. ;;   called <scenename>-frames.  The total size of these files is 1.5 bytes
  35. ;;   for each pixel in the frame (because there is one byte of luminance
  36. ;;   per pixel and 1 byte of U and V per 4-pixels).
  37. ;;
  38. ;;   For example, a 320x240 frame will create three files totalling 115200
  39. ;;   bytes, and a 100 frame animation would thus use about 11.5Mbytes prior
  40. ;;   to MPEG compression.
  41. ;;
  42. ;;   If you are rendering extremely large animations, or are very short on
  43. ;;   disk space, you could modify the (free) Stanford encoder such that it
  44. ;;   could support reading compressed (gzipped) files, then you could add
  45. ;;   a compression command (gzip %s%n.[YUV]) to the Post_Frame_Command.
  46. ;;
  47. ;; Required Unix commands:
  48. ;;   rm, expr, etc. - Standard Unix
  49. ;;   ppmtoyuvsplit  - Standard NetPPM
  50. ;;   mpeg           - Stanford MPEG encoder/decoder
  51. ;;                      havefun.stanford.edu:pub/mpeg/MPEGv1.2.tar.Z
  52. ;;
  53.  
  54. ;; PPM output
  55. Output_to_File=On
  56. Output_File_Type=p
  57.  
  58. ;; Ensure frames directory is created
  59. Pre_Frame_Command=mkdir -p %s-frames
  60. Pre_Frame_Return=
  61.  
  62. ;; After frame, split PPM file into Y,U,V files, then delete PPM
  63. ;; Remove leading 0s from frame number.
  64. Post_Frame_Command=ppmtoyuvsplit %s-frames/`expr %n + 0` %o && rm %o
  65. ;; If error, crash
  66. Post_Frame_Return=f
  67.  
  68. ;; Nothing special prior to scene
  69. Pre_Scene_Command=
  70. Pre_Scene_Return=
  71.  
  72. ;; After scene, generate mpeg file.  Note that current frame is 1 more than
  73. ;; final frame number, so we subtract 1 using expr.  $POV_MPEGOPTS can be
  74. ;; set to give additional options to the mpeg encoder.
  75. ;;
  76. Post_Scene_Command=mpeg -PF -h %w -v %h -a 1 -b $(expr %n - 1) %s-frames/ -s %s.mpeg $POV_MPEGOPTS
  77. ;;If error, crash
  78. Post_Scene_Return=f
  79.  
  80. ;; Don't pause if displaying!
  81. Pause_When_Done=Off
  82.  
  83. Continue_Trace=On                ;;Lets you resume
  84.  
  85.